package com.stu.JdbcTx;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:com/zm/JdbcTx/spring-tx.xml")
public class TestTx {
	/*在xml里配置*/
	@Autowired
	@Qualifier("serviceProxy")
	private AccountService accountService;
	@Test
	public void test2() {
		accountService.transfer("张三", "李四", 500);
	}
}
